package com.etc.controller;

import com.etc.ResultBody;
import com.etc.entity.Goods;
import com.etc.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author 武晓春
 * @Description
 * @Date 2021/2/20  15:13
 **/
@RestController
@RequestMapping("/goods")
public class GoodsController {
    @Autowired
    private IGoodsService iGoodsService;
     @GetMapping("/findByAll")
    public ResultBody findGoodsAll() {
        List<Goods> byAll = iGoodsService.findByAll();
         return  ResultBody.ok(byAll);
        }
    }